﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Aoxuelf.MDSTool.OptionPages
{
    public partial class GeneralControl : UserControl
    {
        private GeneralPage optionPage;

        public GeneralControl()
        {
            InitializeComponent();
        }

        public GeneralPage OptionPage
        {
            get
            {
                return this.optionPage;
            }
            set
            {
                this.optionPage = value;
            }
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.txtUserName.Text = OptionPage.UserName ?? string.Empty;
        }

        private void txtUserName_TextChanged(object sender, EventArgs e)
        {
            optionPage.UserName = this.txtUserName.Text;
        }
    }
}
